package com.scau.hwadee.examination.service;

import com.alibaba.fastjson.JSONArray;
import com.github.pagehelper.PageInfo;
import com.scau.hwadee.examination.entity.Course;
import com.scau.hwadee.examination.entity.Coursecorrespondingrelation;
import com.scau.hwadee.examination.entity.Nationwidecourse;
import com.scau.hwadee.examination.entity.Textbook;

import java.util.List;

/**
 * @author YHX
 * @date 2019/7/30 20:51
 * description
 */
public interface CourseManagerService {
    /**
     * @return int
     * @author YHX
     * @description 导入课程的Excel表
     * @date 16:01 2019/8/4
     * @Param [courses]
     **/
    int insertCourseListByExcel(List<Course> courses);

    /**
     * @return int
     * @author YHX
     * @description 导入全国课程的Excel表
     * @date 16:02 2019/8/4
     * @Param [nationwidecourses]
     **/
    int insertNationalCourseListByExcel(List<Nationwidecourse> nationwidecourses);

    /**
     * @return java.util.List<com.scau.hwadee.examination.entity.Course>
     * @author YHX
     * @description 导出课程的Excel表
     * @date 16:02 2019/8/4
     * @Param []
     **/
    List<Course> getAllCourses2ExportExcel();

    /**
     * @return int
     * @author YHX
     * @description 插入新的课程
     * @date 16:02 2019/8/4
     * @Param [course]
     **/
    int insertNewCourse(Course course);

    /**
     * @return com.github.pagehelper.PageInfo<com.scau.hwadee.examination.entity.Course>
     * @author YHX
     * @description 获取全部的课程
     * @date 16:02 2019/8/4
     * @Param [pageNum, pageSize]
     **/
    PageInfo<Course> getAllCourses(int pageNum, int pageSize);

    /**
     * @return int
     * @author YHX
     * @description 更新课程状态
     * @date 16:03 2019/8/4
     * @Param [courses]
     **/
    int updateCourseState(JSONArray courses);

    /**
     * @return int
     * @author YHX
     * @description 更新课程教材
     * @date 16:03 2019/8/4
     * @Param [courseId, textbook]
     **/
    int updateCourseTextbook(String courseId, String textbookId);

    /**
     * @return com.scau.hwadee.examination.entity.Textbook
     * @author YHX
     * @description 根据课程主键获取课程的教材信息
     * @date 16:03 2019/8/4
     * @Param [courseId]
     **/
    Textbook getTextbookOfCourse(String courseId);

    /**
     * @return int
     * @author YHX
     * @description 新增全国课程
     * @date 16:03 2019/8/4
     * @Param [nationwidecourse]
     **/
    int createNewNationalCourse(Nationwidecourse nationwidecourse);

    /**
     * @return int
     * @author YHX
     * @description 更新全国课程的信息
     * @date 16:04 2019/8/4
     * @Param [nationwidecourse]
     **/
    int updateNationalCourse(Nationwidecourse nationwidecourse);

    /**
     * @return com.github.pagehelper.PageInfo<com.scau.hwadee.examination.entity.Nationwidecourse>
     * @author YHX
     * @description 获取全部的全国课程信息
     * @date 16:04 2019/8/4
     * @Param [pageNum, pageSize]
     **/
    PageInfo<Nationwidecourse> getAllNationalCourse(int pageNum, int pageSize);

    /**
     * @return int
     * @author YHX
     * @description 删除多个全国课程
     * @date 16:04 2019/8/4
     * @Param [params]
     **/
    int deleteNationCourseList(JSONArray params);

    /**
     * @return com.github.pagehelper.PageInfo<com.scau.hwadee.examination.entity.Course>
     * @author YHX
     * @description 获取某个专业版本的全部的理论或者实践课程
     * @date 16:04 2019/8/4
     * @Param [pageNum, pageSize, property]
     **/
    PageInfo<Course> getAllPracticalOrTheoreticalCourse(int pageNum, int pageSize, String property,String mvId);

    /**
     * @return int
     * @author YHX
     * @description 新增理论和实践对应关系
     * @date 16:05 2019/8/4
     * @Param [coursecorrespondingrelations]
     **/
    int insertCourseCorrespondingRelationList(List<Coursecorrespondingrelation> coursecorrespondingrelations);

    /**
     * wrh
     * 完成查找课程
     * @param csId
     * @return
     */
     Course getCourseByCsId(String csId);
}
